package comand.impl;

import comand.Calcultor;
import comand.Command;

public  class Muti extends Command {
    Double total,value;
    public Muti(Double value ){
        this.total = Calcultor.total;
        this.value=value;
    }
    @Override
    public void execute() {
        System.out.println(total+"*"+value+"="+(total*value));
        total=total*value;
        Calcultor.total=this.total;
    }

    @Override
    public void deExecute() {
        System.out.println(total+"/"+value+"="+(total/value));
        total=total/value;
        Calcultor.total=this.total;
    }
}
